package log

import (
	"time"
)

func ConfigLocalFilesystemLogger(logPath string, logFileName string, maxAge time.Duration, rotationTime time.Duration) {
	//baseLogPath := path.Join(logPath, logFileName)
	//writer, err := rotatelogs.New(
	//	baseLogPath + ".%Y%m%d%H%M",
	//	rotatelogs.WithLinkName(baseLogPath), //生成软链接，指向最新日志文件
	//	rotatelogs.WithMaxAge(maxAge),        //文件最大保存时间
	//	rotatelogs.WithRotationTime(rotationTime), //日志切割时间间隔
	//)
	//
	//if err != nil{
	//	log.Errorf("config local file system logger error. %+v", errors.WithStack(err))
	//}

	//lfHook := lfshook.NewHook(lfshook.WriterMap{
	//	log.DebugLevel: writer, // 为不同级别设置不同的输出目的
	//	log.InfoLevel:  writer,
	//	log.WarnLevel:  writer,
	//	log.ErrorLevel: writer,
	//	log.FatalLevel: writer,
	//	log.PanicLevel: writer,
	//})

	//log.AddHook(lfHook)

}
